package com.pharmacy.MedicineManage.dao;

import com.pharmacy.MedicineManage.entity.Medicine;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MedicineMapper {
    List<Medicine> findAllMedicines();
    Medicine findMedicineById(Integer id);
    Medicine findMedicineByCode(String code);
    List<Medicine> findMedicinesByName(String name);
    List<Medicine> findMedicinesByCategory(String category);
    int insertMedicine(Medicine medicine);
    int updateMedicine(Medicine medicine);
    int deleteMedicine(Integer id);
    int updateMedicineStatus(@Param("id") Integer id, @Param("status") Integer status);
}